package com.Day4;

public class MyStack implements CommonList{
    private DynamicList list;

    public MyStack(){

    }


    //压栈
    public void push(int num){
        list.addLast(num);
    }

    //出栈
    public int pop() {
        list.removeFirst();
        int result = list.getFirst();
        return 0;
    }

    //栈顶元素
    public int peek(){
        return list.getFirst();
    }

    @Override
    public int getSize() {
        return 0;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public boolean isContains(int i) {
        return false;
    }

    @Override
    public int[] toArray() {
        return new int[0];
    }

    @Override
    public void clear() {

    }
}
